<script>
$(function() {
$('#datePicker').datepicker({
    changeMonth: true,
    changeYear: true,
    dateFormat: "yy-mm-dd",
});
$('#datePicker2').datepicker({
    changeMonth: true,
    changeYear: true,
    dateFormat: "yy-mm-dd",
});
});
</script>
<div class="head-content"><span>Tài liệu - văn bản</span></div>
                    
                    
                    <div class="fix content-site">
                        <div class="box-search-document">
                            <form method="post" action="/documents/search">
                            <table>
                                <tr>
                                    <td><label>Thư mục</label> <select name="forder" class="sl-document"><option value="">-- chọn --</option>
                                    <?php foreach($this->dataForder as $vForder):?>
                                    <option value="<?php echo $vForder['id'];?>" <?php if(@$this->getforder == $vForder['id']){ echo "selected = 'selected'";}?>><?php echo $vForder['name'];?></option>
                                    <?php endforeach;?>
                                    </select></td>
                                    <td><label>Loại văn bản</label> <select class="sl-document" name="type"><option value="">-- chọn --</option>
                                    <?php foreach($this->dataType as $vType):?>
                                    <option value="<?php echo $vType['id'];?>" <?php if(@$this->gettype == $vType['id']){ echo "selected = 'selected'";}?>><?php echo $vType['name'];?></option>
                                    <?php endforeach;?>
                                    </select></td>
                                </tr>
                                <tr>
                                    <td><label>Nơi ban hành</label> <select class="sl-document" name="where"><option value="">-- chọn --</option>
                                    <?php foreach($this->dataWhere as $vWhere):?>
                                    <option value="<?php echo $vWhere['id'];?>" <?php if(@$this->getwhere == $vWhere['id']){ echo "selected = 'selected'";}?>><?php echo $vWhere['name'];?></option>
                                    <?php endforeach;?>
                                    </select></td>
                                    <td><label>Ký kiệu</label> <input  type="text" class="txt txt-document" name="key" value="<?php echo @$this->getkey?>"/></td>
                                </tr>
                                <tr>
                                    <td><label>Từ ngày</label> <input id="datePicker"  type="text" class="txt txt-document" name="date_from" value="<?php echo @$this->getdatefrom?>"/></td>
                                    <td><label>Đến ngày</label> <input id="datePicker2"  type="text" class="txt txt-document" name="date_to" value="<?php echo @$this->getdateto?>"/></td>
                                </tr>
                                <tr>
                                    <td><label>Trích yếu</label><input  type="text" class="txt txt-document" name="keyword" placeholder="Từ khóa" value="<?php echo @$this->getkeyword?>"/></td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td><input  type="submit" value="Tìm kiếm" class="bt bt-seach-document"/></td>
                                </tr>
                            </table>
                            </form>
                        </div>
                        <div class="box-result-document">
                            <table>
                                <tr>
                                    <th width=60>Ký hiệu</th>
                                    <th width="100">Ngày ban hành</th>
                                    <th>Trích yếu</th>
                                </tr>
                                <?php foreach($this->data as $value):?>
                                <tr>
                                    <td><a href="<?php echo $this->baseUrl()."/public/upload/files/".$value['link'];?>"><img src="<?php echo $this->baseUrl()."/images/f-item.gif";?>"/></a></td>
                                    <td><?php echo date('d/m/Y', $value['date']);?></td>
                                    <td><p><a href="<?php echo $this->baseUrl()."/public/upload/files/".$value['link'];?>"><?php echo $value['title'];?></a></p> 
<p>Loại: <?php echo $value['type_doc_name'];?> - Nơi ban hành: <?php echo $value['where_name'];?></p></td>
                                </tr>
                                <?php endforeach;?>
                               
                            </table>
                        </div>
<div class="paging">
<?php echo $this->paginationControl($this->data, 'Sliding', 'pagination.phtml'); ?>
</div>
                    </div><!-- end content-site -->